﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data.Sql;


public partial class Dokumentacija_PregledICeliNaBiznisot : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string projectName = Request.QueryString["projectName"];
            ImeNaPlanotLabel.Text += " " + projectName;
        }
    }
    protected System.Data.SqlClient.SqlCommand sqlSelectCommand1;
    protected System.Data.SqlClient.SqlCommand sqlInsertCommand1;
    protected System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
    protected System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
    protected System.Data.SqlClient.SqlConnection Connection1;
    protected System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
    protected System.Data.SqlClient.SqlDataReader sqldr;

    protected void Sledna1_Click(object sender, EventArgs e)
    {
        string conn = "Data Source=ELENA-PC\\SQLEXPRESS;Initial Catalog=BusinessPlanDB;Integrated Security=True";
        SqlConnection Connection1 = new SqlConnection(conn);
        Connection1.Open();

        SqlCommand cmd = new SqlCommand();
        SqlCommand cmd1 = new SqlCommand();
        SqlCommand cmd2 = new SqlCommand();
        SqlCommand cmd3 = new SqlCommand();

        cmd.Connection = Connection1;
        cmd1.Connection = Connection1;
        cmd2.Connection = Connection1;
        cmd3.Connection = Connection1;

        string projectName = Request.QueryString["projectName"];


        cmd1.CommandText = "Update Documentation set pregled_i_celi_na_biznisot='" + PregledICeliNabiznisotEditor.Text.ToString().ToLower() + "'where projectName='" + projectName + "' ";
        cmd1.ExecuteNonQuery();

        Connection1.Close();

        Response.Redirect("~/Dokumentacija/AnalizaNaPazarot.aspx?projectName=" + projectName);
    }
}
